<template>
  <div class="home">
    <h1>欢迎首页</h1>
    <p>当前计数: {{ count }}</p>
    <button @click="increment">增加</button>
  </div>
</template>

<script>
import { mapState, mapActions } from 'vuex'

export default {
  name: 'HomeView',
  computed: {
    ...mapState('counter', ['count'])
  },
  methods: {
    ...mapActions('counter', ['increment'])
  }
}
</script>